下次自动登录 忘记密码
请扫码下载APP注册
img").on("click", function () { var time = new Date().getTime(); $(this).attr("src", "/pg/web/user/ajaxgetverifycode/id/1.html" + '?' + time); }); //-----------------------↑↑↑切换验证码图片↑↑↑----------------------- //-----------------------↓↓↓下次自动登录↓↓↓----------------------- $(".remember-password").on("click", function () { var that = $(this); if (that.hasClass("active")) { that.removeClass("active"); $('#login_remember').val("0"); } else { that.addClass("active"); $('#login_remember').val("1"); } }); //-----------------------↑↑↑下次自动登录↑↑↑----------------------- $(document).ready(function () { $("label.telephone-code").each(function () { var that = $(this); that.html("+" + that.siblings("select.telephone-code-select").val()); }); }); //用户登录 $('form[name="loginForm"]').validator({ stopOnError: true, timely: 0, fields: { 'login_username': { rule: 'required', msg: { required: "手机号/用户名不能为空" }, target: ".error-alert" }, 'login_password': { rule: 'required', msg: { required: "密码不能为空" }, target: ".error-alert" }, 'verfity_code': { rule: 'required', msg: { required: "验证码不能为空" }, target: ".error-alert" } } }); function passwordValid() { $(".verification-body .form-body .error-alert").html(""); if (!$(".verification-body input[name='forget_username']").val()) { $(".verification-body .form-body .error-alert").html("手机号不能为空"); $(".verification-body input[name='forget_username']").focus(); return; } else if (!$(".verification-body input[name='forget_phone_code']").val()) { $(".verification-body .form-body .error-alert").html("验证码不能为空"); $(".verification-body input[name='forget_phone_code']").focus(); return; } switchPage("reset_form"); } function resetPasswordSubmit() { $(".reset-body .form-body .error-alert").html(""); if (!$(".reset-body input[name='forget_password']").val()) { $(".reset-body .form-body .error-alert").html("密码不能为空"); $(".reset-body input[name='forget_password']").focus(); return; } else if ($(".reset-body input[name='forget_password']").val() !== $(".reset-body input[name='forget_password_2']").val()) { $(".reset-body .form-body .error-alert").html("两次密码不一致"); $(".reset-body input[name='forget_password_2']").focus(); return; } $.ajax({ data: { 'forget_international_code': $("#forgetPasswordForm input[name='forget_international_code']").val(), 'forget_username': $("#forgetPasswordForm input[name='forget_username']").val(), 'forget_phone_code': $("#forgetPasswordForm input[name='forget_phone_code']").val(), 'forget_password': $("#forgetPasswordForm input[name='forget_password']").val() }, type: 'POST', dataType: 'json', url: "/pg/web/user/forgetpassword.html", success: function (data) { if (data.e != 0) { $(".verification-body .form-body .error-alert").html(data.m); switchPage("reset_valid"); } else { switchPage("reset_success"); $("#forgetPasswordForm").reset(); } } }); }